<?php

	include("dboper.php");

	if(!@$_POST['akses'] == true) {
	   die('Akses langsung tidak diperbolehkan!');
	}
		
	ob_start(); 
	system("ipconfig /all"); 
	$cominfo=ob_get_contents(); 
	ob_clean(); 
	$search = "Physical";
	$primarymac = strpos($cominfo, $search); 
	$mac=substr($cominfo,($primarymac+36),17);//MAC Address
	
	$id = $_POST['idAsisten'];	
	$n1 = $_POST['materiRate'];	
	$n2 = $_POST['suasanRate'];	
	$n3 = $_POST['speakingRate'];	
	$n4 = $_POST['disiplinRate'];		
	$pesan = mysql_real_escape_string($_POST['pesanVoter']);	
	$total = ($n1 + $n2 + $n3 + $n4) / 4;
	$makul = $_POST['matakuliahVoter'];	
	$kelas = $_POST['kelasVoter'];
	$det = 'N1='.$n1.',N2='.$n2.',N3='.$n3.',N4='.$n4.'';

	sendVote($id,$pesan,$total,$mac,$makul,$kelas,$det);
?>
